﻿using System;
namespace CS.Common.Db
{
	public interface IOraDatabase
	{
		void BeginTrans();
		void CommitTrans();
		Oracle.DataAccess.Client.OracleConnection Connection { get; }
		string ConnectionString { get; }
		Oracle.DataAccess.Client.OracleCommand CreateCommand(string cmdText, System.Data.CommandType cmdType);
		Oracle.DataAccess.Client.OracleConnection CreateConnection();
		Oracle.DataAccess.Client.OracleCommand CreateProcCommand(string cmdText, params Oracle.DataAccess.Client.OracleParameter[] param);
		Oracle.DataAccess.Client.OracleDataReader CreateReader(string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		Oracle.DataAccess.Client.OracleDataReader CreateReader(string cmdText, System.Collections.Generic.Dictionary<string, object> param);
		Oracle.DataAccess.Client.OracleCommand CreateTextCommand(string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		Oracle.DataAccess.Client.OracleCommand CreateTextCommand(string cmdText, System.Collections.Generic.Dictionary<string, object> param);
		void DisConnect();
		void Dispose();
		void ExecProc(string cmdText, params Oracle.DataAccess.Client.OracleParameter[] param);
		int ExecUID(string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		int ExecUID(string cmdText, System.Collections.Generic.Dictionary<string, object> param);
		long QueryBlob(System.IO.Stream st, int colIndex, int bufSize, long limit, string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		long QueryBlob(System.IO.Stream st, string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		string QueryClob(int colIndex, string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		string QueryClob(string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		void QueryDecimal(ref decimal val, string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		void QueryField(ref object val, string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		void QueryInt(ref int val, string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		void QueryLong(ref long val, string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		object[] QueryRowAsArray(string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		System.Collections.Generic.Dictionary<string, object> QueryRowAsDictionary(string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		System.Collections.Generic.Dictionary<string, object> QueryRowAsDictionary(string cmdText, System.Collections.Generic.Dictionary<string, object> param);
		object QueryRowAsObject(IReaderMapper<object> mapper, string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		System.Collections.Generic.IList<object> QueryRowsAsList(IReaderMapper<object> mapper, string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		void QueryShort(ref short val, string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		void QueryString(ref string val, string cmdText, params System.Collections.Generic.KeyValuePair<string, object>[] param);
		void Rollback();
	}
}
